﻿<?xml version="1.0" encoding="utf-8" ?>
<DbDataRequest connection="$UserManagementDBConnection$" type="$UserManagementDbType$" defaultFormatter="bizobj TreeNode">
  <SqlStatement hasResults="true">
	  SELECT t.objectId as id ,t.parentId,t.parentHostId,tc.keyName,c.canCreateChildCompanies
	  FROM ObjectTreeNodes t  
	  	INNER JOIN ObjectTreeCounts as tc on tc.objectId = t.objectId
		INNER JOIN Companies c ON c.id=t.objectId
	  WHERE t.parentHostId=@parentHostId AND t.objectId=@id
  </SqlStatement>
  <Param name="id" type="UniqueIdentifier"/>
  <Param name="parentHostId" type="UniqueIdentifier"/>
</DbDataRequest>